package org.example.rabbitmq.client.routing;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

public class TopicRouteTest {
    public static void main(String[] args) throws IOException, TimeoutException {
//        * (star) can substitute for exactly one word.
//        # (hash) can substitute for zero or more words.
        TopicRoute topicRoute = new TopicRoute();
        topicRoute.registerListener("com.#");
        topicRoute.registerListener("com.rabbit.*");
        topicRoute.registerListener("com.rabbit.test");
        topicRoute.publish("com.rabbit.test", "com.rabbit.www", "com.test", "cn.test");
        topicRoute.shutdown();
    }
}
